home *** CD-ROM | disk | FTP | other *** search
Wrap
/* graphics: toolbox interfaces by Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga Copyright 1987 - 1991 Apple Computer, Inc. All rights reserved. */ #ifndef graphicsToolboxIncludes #define graphicsToolboxIncludes #ifndef __WINDOWS__ #include <Windows.h> #endif #ifndef fontTypesIncludes #include "font types.h" #endif #ifndef graphicsTypesIncludes #include "graphics types.h" #endif #ifdef appleInternal #define GXInlineCode(x) #endif #ifndef GXInlineCode #define GXInlineCode(x) = {0x303C, x, 0xA832} #endif typedef void (*gxUserViewPortFilter)(gxShape toFilter, gxViewPort portOrder, long refCon); gxViewPort GXNewWindowViewPort(WindowPtr qdWindow) GXInlineCode(0x11FA); gxViewPort GXGetWindowViewPort(WindowPtr qdWindow) GXInlineCode(0x11FB); WindowPtr GXGetViewPortWindow(gxViewPort portOrder) GXInlineCode(0x11FC); GDHandle GXGetViewDeviceGDevice(gxViewDevice theDevice) GXInlineCode(0x11FD); gxViewDevice GXGetGDeviceViewDevice(GDHandle qdGDevice) GXInlineCode(0x11FE); /* gxPoint utilities */ void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, gxPoint *fixedPt) GXInlineCode(0x1200); /* mouse utilities */ void GXGetGlobalMouse(gxPoint *globalPt) GXInlineCode(0x1201); /* return mouse location in fixed-gxPoint global space */ void GXGetViewPortMouse(gxViewPort portOrder, gxPoint *localPt) GXInlineCode(0x1202); /* return fixed-gxPoint local mouse (gxViewPort == 0 --> default) */ /* QuickDraw PICT utilities (NOTE: InitGraf must must be called before using these routines) */ PicHandle GXShapeToPICT(gxShape source) GXInlineCode(0x1203); /* given a gxShape, return a handle to a QuickDraw PICT */ gxShape GXPICTToShape(PicHandle qdPicture) GXInlineCode(0x1204); /* vice-versa */ gxUserViewPortFilter GXGetViewPortFilter(gxViewPort portOrder, long *refCon) GXInlineCode(0x1206); void GXSetViewPortFilter(gxViewPort portOrder, gxUserViewPortFilter filter, long refCon) GXInlineCode(0x1207); /* QD to QD GX Translator typedefs and functions */ #define gxDefaultOptionsTranslation 0x0000 #define gxOptimizedTranslation 0x0001 #define gxReplaceLineWidthTranslation 0x0002 #define gxSimpleScalingTranslation 0x0004 #define gxSimpleGeometryTranslation 0x0008 /* implies simple scaling */ #define gxSimpleLinesTranslation 0x000C /* implies simple geometry & scaling */ #define gxLayoutTextTranslation 0x0010 /* turn on gxLine layout (normally off) */ typedef long gxTranslationOptions; #define gxContainsFormsBegin 0x0001 #define gxContainsFormsEnd 0x0002 #define gxContainsPostScript 0x0004 #define gxContainsEmptyPostScript 0x0008 typedef OSErr (*gxShapeSpoolFunction)(gxShape toSpool, long refCon); typedef long gxTranslatorStatistics; void GXInstallQDTranslator(GrafPtr port, gxTranslationOptions options, const Rect *srcRect, const Rect *dstRect, Point patStrech, gxShapeSpoolFunction userFunction, long refCon) GXInlineCode(0x1269); gxTranslatorStatistics *GXRemoveQDTranslator(GrafPtr port, gxTranslatorStatistics *statistics) GXInlineCode(0x126A); gxShape GXConvertPICTToShape(const PicHandle pict, gxTranslationOptions options, const Rect *srcRect, const Rect *dstRect, Point patStretch, gxShape destination, gxTranslatorStatistics stats) GXInlineCode(0x126B); #undef GXInlineCode #endif